package com.vainycos.lotterysearch.controller;

import com.vainycos.lotterysearch.model.base.Result;
import com.vainycos.lotterysearch.service.WorldCupDetailService;
import com.vainycos.lotterysearch.service.WorldcupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Vainycos
 * @description
 * @date: 2022/11/22 10:40
 */
@RestController
@RequestMapping("/worldcup")
public class WorldCupController {

    @Autowired
    private WorldcupService worldcupService;

    @Autowired
    private WorldCupDetailService worldCupDetailService;

    /**
     * 初始化概况全量更新
     * @return
     */
    @GetMapping("/initOverview")
    public Result initOverview(){
        return Result.of(worldcupService.initOverview());
    }

    /**
     * 初始化详情全量更新
     * @return
     */
    @GetMapping("/initDetail")
    public Result initDetail(){
        return Result.of(worldCupDetailService.initDetail());
    }
}
